package com.jt.consumer.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @FeignClient 注解描述的接口，用于定义远程调用规范
 * 其中，name属性的值为远端服务名，同时也会讲这个名字作为
 * RemoteProviderService 接口实现类对象的Bean对象名字
 */
@FeignClient(name = "sca-provider",fallbackFactory = RemoteFileFallbackFactory.class,contextId = "RemoteProviderService")
public interface RemoteProviderService {
    @GetMapping("/provider/echo/{msg}")
    String echoMsg(@PathVariable("msg") String msg);
}
